package com.csjbot.weedle_auto.app.automatic

import com.csjbot.weedle_auto.SerialServer.util.bean.SerialPortEvents
import com.csjbot.weedle_auto.Slam.events.RobotStatusUpdateEvent
import com.csjbot.weedle_auto.app.automatic.bean.MainItemBean
import com.csjbot.weedle_auto.base.BasePresenter
import com.csjbot.weedle_auto.base.BaseView

/**
 * author : chenqi.
 * e_mail : 1650699704@163.com.
 * create_time : 8/21/17.
 */

interface AutoMaticContract {
    interface view : BaseView<presenter> {
        fun showList(list: List<MainItemBean>)

        fun testStop(tag: String)

        fun updateTouch(msg: String, s: Boolean) //刷新摸手的数据

        fun updateOther(serialPort: String, s: Boolean) //刷新超声波、红外、餐盘红外、急停的数据

        fun updateSnUp(msg: String, s: Boolean) //刷新上身sn数据

        fun updateSnDown(msg: String, s: Boolean) //刷新下身sn数据

        fun showResult(msg: String) //显示所有的数据

        fun showSlamStatus(msg: String, s: Boolean)

        fun clearResult()

        fun stopShowActionButton()

        fun openShowActionButton()


        fun slamLost()


    }

    interface presenter : BasePresenter {
        fun setList()

        fun setText(data: String) //获取spinner的数据

        fun setSerialInfor(events: SerialPortEvents, times: Int)

        fun testTimes(times: Int)

        fun actionTask()

        fun actionSlam()

        fun connectLostSlam()

        fun connectSlam()

        fun slamStatus(event: RobotStatusUpdateEvent)

        fun getResult()

        fun closeTask()

        fun stopThread()

        fun clear()
    }
}
